#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int fac(int x)
{
	if (x <= 1)
	{
		return 1;
	}
	else
		return x * fac(x - 1);
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	int ret = fac(n);
	printf("%d", ret);
	return 0;
}